﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Quiziqal.Application.ViewModels;
using Quiziqal.Domain;

namespace Quiziqal.Application.Controllers
{
    public class QuizController : Controller
    {
        private readonly IQuiziqalService service;

        public QuizController(IQuiziqalService service)
        {
            this.service = service;
        }

        public ActionResult List()
        {
            var viewModel = new QuizListViewModel();
            viewModel.Quizzes = service.GetQuizzesByOwner(new User());
            return View(viewModel);
        }
    }
}
